﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace MyAMS.WebServer.Models
{
    /// <summary>
    /// 基节点
    /// </summary>
    [DataContract]
    public class BaseNode : NamedEntity
    {
        /// <summary>
        /// 获取或设置标题
        /// </summary>
        /// <value>标题</value>
        [DataMember]
        public string Title { get; set; }

        /// <summary>
        /// 获取关键字列表
        /// </summary>
        [DataMember]
        public IList<string> Keywords { get; set; }

        /// <summary>
        /// 获取设置描述
        /// </summary>
        [DataMember]
        public string Desctiption { get; set; }

        /// <summary>
        /// 获取或设置正文
        /// </summary>
        /// <value>正文</value>
        [DataMember]
        public string Body { get; set; }

        /// <summary>
        /// 获取或设置正文摘要
        /// </summary>
        /// <value>正文摘要</value>
        [DataMember]
        public string BodyShort { get; set; }

        /// <summary>
        /// 获取或设置父级节点
        /// </summary>
        /// <value>父级节点</value>
        [DataMember]
        public Node Parent { get; set; }

        /// <summary>
        /// 获取或设置一个值, 改制指示当前实例是否已被拥有
        /// </summary>
        /// <value>已被拥有</value>
        [DataMember]
        public bool IsOwned { get; set; }

        /// <summary>
        /// 获取或设置状态
        /// </summary>
        /// <value>状态</value>
        [DataMember]
        public EntityState State { get; set; }

        /// <summary>
        /// 获取或设置路由规则
        /// </summary>
        /// <value>路由规则</value>
        [DataMember]
        public IList<RoutingRole> RoutingRoles { get; set; }

        /// <summary>
        /// 获取或设置跳转地址
        /// </summary>
        [DataMember]
        public Uri RedirectUri { get; set; }

        /// <summary>
        /// 获取或设置创建时间
        /// </summary>
        /// <value>创建时间</value>
        [DataMember]
        public DateTime? Created { get; set; }

        /// <summary>
        /// 获取或设置修改时间
        /// </summary>
        /// <value>修改时间</value>
        [DataMember]
        public DateTime? Modified { get; set; }

        /// <summary>
        /// 获取或设置发布时间
        /// </summary>
        /// <value>发布时间</value>
        [DataMember]
        public DateTime? Published { get; set; }
    }
}
